package org.ectar.papi.event
{
	import flash.events.Event;
	
	
	/**
	 * 
	 * Events fired during GDataService operation
	 * Please refer to each function to see what event will be fired
	 * 
  	 * @author Mykhaylo Lytvynyuk
	 * 
	 */
	public class GDataEvent extends Event
	{
		
		public static const NO_DATA_AVAILABLE:String = "NO_DATA_AVAILABLE";
		public static const GET_PHOTOS_BY_ALBUM:String = "GET_PHOTOS_BY_ALBUM";
		public static const GET_PHOTOS_BY_ALBUM_FAILED:String = "GET_PHOTOS_BY_ALBUM_FAILED";
		public static const GET_PHOTO:String = "GET_PHOTO";
		public static const GET_PHOTO_FAILED:String = "GET_PHOTO_FAILED";
		public static const GET_ALBUM:String = "GET_ALBUM";
		public static const GET_ALBUM_FAILED:String = "GET_ALBUM_FAILED";
		public static const GET_ALBUMS:String = "GET_ALBUMS";
		public static const GET_ALBUMS_FAILED:String = "GET_ALBUMS_FAILED";
		public static const GET_PHOTOS_BY_TERM:String = "GET_PHOTOS_BY_TERM";
		public static const GET_PHOTOS_BY_TERM_FAILED:String = "GET_PHOTOS_BY_TERM_FAILED";
		public static const GET_PHOTOS_BY_GEO:String = "GET_PHOTOS_BY_GEO";
		public static const GET_PHOTOS_BY_GEO_FAILED:String = "GET_PHOTOS_BY_GEO_FAILED";
		public static const GET_COMMENTS_FOR_PHOTO:String = "GET_COMMENTS_FOR_PHOTO";
		public static const GET_COMMENTS_FOR_PHOTO_FAILED:String = "GET_COMMENTS_FOR_PHOTO_FAILED";

		public static const USER_AUTHENTICATED:String = "USER_AUTHENTICATED";
		public static const USER_AUTHENTICATION_FAILED:String = "USER_AUTHENTICATION_FAILED";
		
		public static const COMMENT_DELETED:String = "COMMENT_DELETED";
		public static const UNABLE_TO_SEND:String = "UNABLE_TO_SEND";
		public static const COMMENT_ADDED:String = "COMMENT_ADDED"
		public static const ALBUM_ADDED:String = "ALBUM_ADDED"
		public static const ALBUM_DELETED:String = "ALBUM_DELETED";		
		
		public static const IO_ERROR:String = "IO_ERROR"
		public static const NOT_AUTHENTICATED:String = "NOT_AUTHENTICATED";		
		
		private var _result:Object = null;
		
		public function GDataEvent(type:String, result:Object = null, bubbles:Boolean = false,cancelable:Boolean = false) {
			super(type,bubbles,cancelable);
			this.result = result;
		}
		
		public function set result(r:Object):void {
			this._result = r;
		}
		
		public function get result():Object {
			return _result;
		}
	}
}